<%@ page contentType="text/html;charset=UTF-8" %>
  <header class="main-header" style="top:0;">
  	<a href="${page_web}/user/index" class="logo">
      <span class="logo-mini" style="margin-left: 8px;"><b>用户</b></span>
      <span class="logo-lg text-center"><i class="fa fa-user"></i> 用户中心</span>
    </a>
 <script>
  $(function(){
	if(${null==loginUser}){//此处警告不影响代码
		 window.location.href="/";
	}
  });
  </script>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top" style="height: 10px;">

<%--    <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">--%>
<%--        <span class="sr-only">Toggle navigation</span>--%>
<%--    </a>--%>

      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <li><a href="${page_web}/user/index"><i class="fa fa-home"></i> HOME</a></li>
          <!--
         <li class="dropdown tasks-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown"  style="height:50px;">
              <i class="fa fa-comments-o"></i>
              <span class="label label-danger countNotice"></span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">您有<span class="countNotice"></span>条未读消息</li>
              <li>
                <ul class="menu">
                  <li>
                  </li>
                </ul>
              </li>
              <li class="footer">
               <a href="${page_web}/user/message">查看所有</a>
              </li>
            </ul>
          </li>
          -->

          <!-- User Account: style can be found in dropdown.less -->
          <li class="dropdown user user-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
				<i class="fa fa-user"></i>
              	<span id="topName" class="hidden-xs">${loginUser.userCname}</span>
            </a>
            <ul class="dropdown-menu">
              <!-- User image -->
              <li class="user-header">
					   <img class="img-circle " src="${ctx}/images/plateform/person2.png"/>

                <p>
                  <small>${loginUser.userCname} - ${loginUser.userEname }</br>
                 	 手机号-${loginUser.mobile}</small>
                </p>
              </li>
              <!-- Menu Footer-->
              <li class="user-footer">
                <div class="pull-right">
                  <!-- <a href="${ctx}/logout" class="btn btn-default btn-flat">退出</a> -->
                  <a href="javascript:logout();" class="btn btn-danger btn-flat">退出</a>
                </div>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </nav>
  </header>
<script>

function logout(){
	//layer.confirm('您确定工作已经保存，并退出该系统？', {btn: ['确认','取消'],closeBtn: 0,offset: '220px'}
	layer.confirm('您确定要退出该系统？', {btn: ['确认','取消'],closeBtn: 0,offset: '220px'}
		, function(){
			window.location = ctx+'/logout';
		}, function(){});
}

</script>
  <script>
  	//jquery.pjax 绑定A标签点击
      $(document).pjax("[data-pjax='true'], a[data-pjax='true']", ".content-wrapper", {
       	fragment: ".content-wrapper"
      });

	  //$(document).pjax('a', '#pjax-container');
	  $(document).on("pjax:send", function() {
			//alert("发送完成");
		});
		$(document).on("pjax:complete", function() {
	  		//alert("加载完成");
			 $(".sidebar-menu").find("li").each(function(){
				 $(this).removeClass("_active");
			 });

			 $("#"+clickMenu).addClass("_active");
		});
	</script>


